<template>
    <form-field class="ph-field-multilines">
        <form-switch :value="value" :type="type" :disabled="disabled" @change="onChange"/>
    </form-field>
</template>
<script lang="ts">
import { defineComponent} from 'vue'
import FormField from './field.vue'
import FormSwitch from './switch.vue'
export default defineComponent({
    components:{FormField,FormSwitch},
    props:{
        type:{
            type:String,
        },
        disabled:{
            type:Boolean,
            default:false
        },
        value:{
            type:Boolean,
            default:false
        }
    },
    setup(props,{emit}) {
        const onChange = (v:boolean)=>{
            emit('ph-change',v)
        }
        return {
            onChange
        }
    },
})
</script>

